<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="vue.js"></script>
	</head>
	<body>
		<div id="app">
		<p v-show="age>=18">成年</p>
		<p v-show="age<18">未成年</p>
		<p v-if="age>=18">成年</p>
		<p v-if="age<18">未成年</p>
		<hr />
		<p v-if="salary<=10">普通阶级</p>
		<p v-else-if="salary<=500">中产阶级</p>
		<p v-else="salary>500">富豪阶级</p>
		<hr />
		<p v-for="o in hobby">{{o}}</p>
		<p v-for="o,i in hobby">{{i}}-{{o}} </p>
		<hr />
		<button v-on:click="show">点我</button>
		<button v-on:click="show()">点我</button>
		<button @click="show()">点我</button>
		<hr />
		<a :href="site.url">{{site.name}}</a>
		<hr />
		<p v-text="sysname"></p>
		<p v-html="sysname"></p>
		</div>
		
	</body>
	<script>
		new Vue({
			el:"#app",
			data:{
				sysname:"<b>京淘</b>京淘电商",
				age:18,
				salary:900,
				hobby:["篮球","健身"],
				site:{
					name:"java培优",
					url:"http://act.codeboy.com"
				}
			},
			methods:{
				show:function(){
					console.log("show method");
				}
			},
			
		});
	</script>
</html>
